<template>
  <div>
    <el-carousel trigger="click" height="50vh">
      <el-carousel-item v-for="(item, index) in swiperLists" :key="index">
        <img class="carouselItem" :src="item.imgUrl" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script setup lang="ts" name="swiper-cmp">
type swiperItem = {
  imgUrl: string
  link: string
}

defineProps<{
  swiperLists: swiperItem[]
}>()
</script>

<style scoped lang="less">
.demonstration {
  color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
  color: #475669;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.carouselItem {
  width: 100%;
  height: 100%;
}
</style>
